Griever's Stuff Griever's Stuff

-Документация -Documentation

-Статьи -Articles

-Переводы... -Translation ...

Griever's pointer searcher Griever's pointer searcher

Для начинающих. For beginners.

Если вы не знаете что такое поинтеры (они же указатели) и не знаете, зачем их менять, почитайте вполне доступную начинающим документацию на "Шедевре". If you do not know what pointers are (they are pointers) and do not know why to change them, read the documentation available to beginners on the "Masterpiece". Эта программа только ищет указатели на NES и ничего больше. This program only looks for pointers to the NES and nothing more. Итак, вы решили качественно перевести игру на NES и хотите найти поинтеры, но методы подсчёта указателей слишком утомительны и вы никогда не открывали отладчик? So, you decided to transfer the game qualitatively to NES and want to find pointers, but the methods for calculating pointers are too tedious and you never opened the debugger? Тогда, в первую очередь попробуйте найти указатели в ROM'е визуально в любом хекс редакторе. Then, first of all try to find pointers in the ROM'e visually in any hex editor. Как правило, указатели организованны в виде таблиц. As a rule, pointers are organized in the form of tables. Со стороны это выглядит как довольно большой массив пар байт: один должен быть обязательно больше $80, а второй может быть любым. From the outside it looks like a rather large array of pairs of bytes: one must be necessarily greater than $ 80, and the second can be any. Как правило, большие байты постоянно медленно растут. As a rule, large bytes are constantly growing slowly. Массив в большинстве случаев располагается прямо перед блоком с текстом в РОМе The array in most cases is located right in front of the block with the text in ROM

Ну как, не видать? Well, can not you see? Тогда запускайте GPS.exe и... Then run GPS.exe and ...

Надёжный способ: A reliable way:

1) Откройте РОМ, в котором вы хотите найти указатели. 1) Open the ROM in which you want to find pointers. Впишите в окно слева адрес строки (в 16-ричном формате), указатель на которую вы хотите найти (адрес вы должны были узнать до этого - вы же должны знать какой текст будете переводить ;)). Enter the address of the line (in hexadecimal format) in the window on the left, the pointer to which you want to find (you should have learned the address before that - you must know what text you will translate;)). Нажмите "Добавить", а затем "Поиск". Click "Add" and then "Search." В нижнем окне должны появиться результаты (если нет, то попробуйте "Быстрый способ", описанный ниже). The bottom window should show results (if not, try the "Quick method" described below). В верхнем ничего не должно быть (т.к. адреса одной строки явно недостаточно, чтобы искать по разности смещений двух строк). In the upper there should be nothing (because the addresses of one line are clearly not enough to search for the difference in the offset of two lines). Ткните мышкой на любом понравившемся вам результате (почти всегда возможных указателей будет несколько), - внизу появится адрес выбранного указателя, а затем нажмите "Поменять". Tap the mouse on any result you like (there are almost always possible pointers), - the address of the selected pointer appears at the bottom, and then click "Change". Прямо с открытой программой, откройте тот же РОМ в любом эмуляторе. Directly with the open program, open the same ROM in any emulator. Если выбранный вами указатель оказался искомым, то строка должна либо поменяться со следующей строкой, либо запороться (пустота или какие-нибудь "кракозябры"). If the selected pointer is the one you are looking for, then the line should either be replaced with the next line, or it may become obfuscated (emptiness or some "krakozyabry"). Если же этого не произошло, то закрывайте эмулятор, возвращайтесь в программу, жмите на "Поменять" ещё раз (РОМ вернётся к исходному состоянию). If this does not happen, then close the emulator, return to the program, click on "Change" again (ROM will return to the original state). А потом ткните на следующий возможный вариант, и так пока не кончатся результаты или не будет найден нужный указатель. And then click on the next possible option, and so until the results end or the desired pointer is found.

!Не забудьте каждый раз закрывать эмулятор, ну или хотя бы перезагружать РОМ после каждого изменения! Do not forget to close the emulator each time, or at least restart the ROM after each change!

Быстрый способ Quick way

2) Быстрее всего было бы найти адрес интересующей вас строки и следующей за ней, и "Добавить" их по очереди (в порядке появления в РОМе). 2) The fastest way would be to find the address of the line you are interested in and the one following it, and "Add" them in turn (in order of appearance in ROM). А затем нажать на поиск. And then click on the search. В верхнем окне, как и в нижнем должны появиться результаты поиска. In the upper window, as in the bottom, search results should appear. Совпадения адресов указателей отмечаются красным цветом. Pointer address matches are marked in red. Если у вас есть совпадения в двух окнах, то ПОЧТИ НАВЕРНЯКА это искомый указатель. If you have coincidences in two windows, then ALMOST MURDER is the desired pointer. Чтобы убедиться окончательно, стоит опять "Поменять" указатели и проверить в эмуляторе (см. "Надёжный способ")Впрочем, если нужна большая точность (слишком много возможных вариантов), можно добавить и адрес третьей строки. To make sure finally, it's worth to "Change" the pointers and check in the emulator (see "Reliable method") However, if you need more accuracy (too many possible options), you can add the address of the third line. Вообще, программа позволяет добавлять сколько угодно адресов и искать по ним. In general, the program allows you to add as many addresses as you like and search for them.

Для тех, кто немного понимает: For those who understand a little:

В программе реализовано два метода поиска указателей: The program has two methods for searching for pointers:

1)Поиск по длине строк. 1) Search by the length of the lines. В последнее время, на форумах Шедевра и MagicTeam участились случаи, когда начинающим советуют искать указатели обычным Relative Search (подробности см. на вышеупомянутых форумах). Recently, in the forums of Masterpiece and MagicTeam, cases where beginners are advised to look for pointers to usual Relative Search (see the above-mentioned forums for details) have become frequent. Данный метод реализует этот алгоритм. This method implements this algorithm. Стоит заметить, что он довольно чувствителен к расположению указателей. It is worth noting that he is quite sensitive to the location of pointers. Нередко в некоторых играх бывает, что указатели организованы не таблицей, а просто разбросаны (например, Cliffhanger). Often in some games it happens that the pointers are organized not by a table, but are simply scattered (for example, Cliffhanger). В таком случае, метод не даст результатов. In this case, the method will not yield results. Кроме того, возможны ситуации, когда поинтеры по порядку в РОМе не указывают на соответствующие строки в порядке их появления в РОМе (если не ошибаюсь, такое было в EarthBound'e), в таком случае, этот метод также будет бесполезен. In addition, there are situations when pointers in order in ROM do not indicate the corresponding lines in the order they appear in ROM (if I'm not mistaken, such was in EarthBound), in this case, this method will also be useless. Зато, это никак не влияет на SetOff X000 (см. ниже) и нижним окошком можно смело пользоваться. But, it does not affect SetOff X000 (see below) and the lower window can be used safely.

2)Поиск по SetOff X000. 2) Search by SetOff X000. Метод не раз описанный в различной документации теперь здесь с небольшими оптимизациями, позволяющими, тем не менее, значительно сузить возможные варианты указателей. The method is described more than once in various documentation here now with small optimizations, which allow, nevertheless, to significantly narrow the possible variants of pointers. Любопытные могут прочитать о "теории" этой оптимизации здесь. Curious can read about the "theory" of this optimization here.

Как уже следовало из вышесказанного, метод довольно надёжен, но есть случаи, когда и он бессилен. As already follows from the above, the method is quite reliable, but there are cases when it is powerless. Например, если старшие и младшие байты указателей раскиданы по двум разным таблицам. For example, if the high and low bytes of pointers are scattered across two different tables. К слову сказать, это бывает не так уж и редко (TaleSpin, Darkwing Duck и пр.). By the way, this is not so rare (TaleSpin, Darkwing Duck, etc.). Тогда указатели можно найти только с помощью отладки кода или, что более реально для начинающих, коруптером. Then pointers can be found only with the help of debugging code or, which is more realistic for beginners, co-worker.

С моей стороны было сделано всё, чтобы программа отсекла как можно больше заведомо неверных вариантов. For my part, everything was done to ensure that the program cut off as many misleading options as possible. Она не ищет указатели в заголовке =), не ищет их в таблице прерываний и CHR-ROM'е, сделаны все те доработки, о которых я говорил в своём документе. It does not look for pointers in the header =), it does not look for them in the interrupt table and CHR-ROM, all the improvements that I mentioned in my document are done. Соответственно, в РОМе обязательно должен быть заголовок. Accordingly, the ROM must necessarily have a header.

При желании можно искать указатели и на пожатые данные, на строки, оптимизированные DTE, MTE, при большом желании на графику ^_^(разумеется, нужно смещение хотя бы первого блока данных) Словом, старый добрый SetOff X000 ещё никому не мешал. If you want, you can search for pointers and saved data, for lines optimized by DTE, MTE, with a strong desire for the graphics ^ _ ^ (of course, you need to shift at least the first data block). In a word, the good old SetOff X000 still did not bother anyone.

FAQ FAQs

1)Почему при нажатии кнопки "Поменять" становятся недоступны некоторые элементы? 1) Why are some items unavailable when I click the "Change" button?

-Это чтобы вы любимый РОМ не запороли ^_^ Впрочем, при большом желании можно просто выйти из программы, не поменяв всё обратно. -That you do not ruin your favorite ROM ~ ^ However, with a strong desire, you can just exit the program without changing everything back.

2)Я всё делал, как написано в инструкции, но вариантов либо нет вообще, либо ни один из предложенных вариантов не подходит! 2) I did everything, as written in the instructions, but there are no options at all, or none of the proposed options are suitable!

-Очевидно, указатели не организованы в таблицы, или старший и младшие байты раскиданы по двум таблицам, либо это нечто, о чём я не имею понятия... Ну что ж, по крайней мере, вы попробовали =). -Obviously, the pointers are not organized into tables, or the older and lower bytes are scattered across two tables, or this is something that I have no idea ... Well, at least you tried =). Кстати, Relative Search'ем или по SetOff X000 можно уже вручную не искать... By the way, Relative Search'em or SetOff X000 can already not be manually searched ...

3)Почему если число заданных строк равно единице, то ищет только SetOff X000? 3) Why if the number of given lines is equal to one, then it only looks for SetOff X000?

-Потому что результатов будет в два раза больше, чем размер PRG-ROM'а, что займет много времени, да и результат будет абсолютно бесполезен. -Because the results will be twice as large as the size of the PRG-ROM, which will take a long time, and the result will be absolutely useless.

4)Почему бы не выводить только то окно, где меньше вариантов? 4) Why not show only the window where there are fewer options?

-Потому что самое главное - увидеть совпадения по двум вариантам поиска, а уж число вариантов указано над каждым окном. -Because the most important thing is to see coincidences on two variants of search, and the number of variants is indicated above each window.

5)У меня идея: можно сделать поиск по SetOff X000 первой строки + поиск по SetOff X000 второй строки, затем сравнить и если указатели идут друг за другом, то это таблица поинтеров. 5) I have an idea: you can do a search on SetOff X000 of the first line + search for SetOff X000 of the second line, then compare and if the pointers go one after another, then this is a table of pointer.

-Хм-м-м... Не думаю. -Hmm-uh ... I do not think so. Это удобно, когда число строк равно двум, но: This is convenient when the number of rows is two, but:

1)Совпадение по двум методам итак даёт хорошую вероятность. 1) The coincidence of the two methods so gives a good probability.

2)В алгоритме поиска по длинам строк уже учтено, что указатели стоят в таблице. 2) In the search algorithm for row lengths, it is already taken into account that the pointers are in the table.

3)Это труднореализуемо. 3) It is hard to implement.

To Do To Do

Если кому будет нужно, можно добавить информацию об открытом РОМе... If you need someone, you can add information about an open ROM ...

Благодарности Thanks

Огромное спасибо Djinn'у. Many thanks to Djinn. Если бы не его помощь, то я бы утонул в Exception Handling'ах и, скорее всего, просто бросил бы программу. If it were not for his help, I would have drowned in Exception Handling, and most likely would just throw the program.

Напоследок At last

Обратите внимание на то, что программу тестил только я на очень небольшом количестве игр (собственно, поэтому это и V0.9). Please note that I only tested the program on a very small number of games (actually, that's why it's V0.9). Так что, если вы подозреваете, что программа работает не так, как должна (у меня такого не было - всё, что она не нашла, было вполне естественно), пожалуйста, не поленитесь и свяжитесь со мной: Griever@rambler.ru So, if you suspect that the program does not work as it should (I did not have it-everything that she did not find was quite natural), please do not be lazy and contact me: Griever@rambler.ru